﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Castle.Windsor;
using Castle.Windsor.Configuration.Interpreters;
using Castle.Core.Resource;

namespace RMD.Utility
{
    public class IoCHelper
    {
        const string cfgSectionName = "castle";
        public static T Resolve<T>()
        {
            WindsorContainer wc = new WindsorContainer(new XmlInterpreter(new ConfigResource(cfgSectionName)));
            return wc.Resolve<T>();
        }
    }
}
